class BootStrap {

     def init = { servletContext ->
     	[
     		[name:'designers',label:'Designers',displayOrder:2],
     		[name:'administrators',label:'Administrators',displayOrder:3],
     		[name:'marketers',label:'Marketers',displayOrder:4],
     		[name:'editors',label:'Editors',displayOrder:5],
     		[name:'managers',label:'Managers',displayOrder:6]
     	].each {		
     		new Category(it).save()
     	}
     	
     	def srilom = new Location(value:'srilom, bangkok')
     	srilom.save()
     	
     	new Category(name:'programmers',label:'Programmers',displayOrder:1)
     		.addToJobs(title:'PHP Developer', details:'ABCDE', type:JobType.FULL_TIME, companyName:'test', contactEmail:'virasak@gmail.com', location:srilom)
     		.addToJobs(title:'Java Developer', details:'ABCDE', type:JobType.FULL_TIME, companyName:'test', contactEmail:'virasak@gmail.com', location:srilom)
     		.addToJobs(title:'Python Developer', details:'ABCDE', type:JobType.FULL_TIME, companyName:'test', contactEmail:'virasak@gmail.com', location:srilom)
     		.addToJobs(title:'Ruby Developer', details:'ABCDE', type:JobType.FULL_TIME, companyName:'test', contactEmail:'virasak@gmail.com', location:srilom)
     		.save()

     }
     def destroy = {
     }
} 
